//子系统切换
function doAction(type) {
	//功能跳转
	switch (type) {
		case 1000: // 新建
			blankForm.action = "/pc/1.0/saas/center-command.do";
			changeNavbar('新建');
			break;
		case 1010: //列表展示
			blankForm.action = "/pc/1.0/saas/center-member.do";
			changeNavbar('列表展示');
			break;
		case 1020: //重点内容
			blankForm.action = "/pc/1.0/saas/center-order.do";
			changeNavbar('重点内容');
			break;
		case 1030: //分类管理
			blankForm.action = "/pc/1.0/saas/identity-change.do";
			changeNavbar('分类管理');
			break;
		case 1040: //回收站
			blankForm.action = "/pc/1.0/saas/identity-change.do";
			changeNavbar('回收站');
			break;
		default:  //提示信息

			return;
	}
	showMessageByType(0, 1, 'aaaaaa');
	//打开页面
	//blankForm.submit();
}

function showMessageByType(code, type, message) {
	if (type == '' || message == "") {
		return;
	} else if (type == '1') {// 成功
		document.all("messagetyle").className = "alert alert-success";
		document.all("messagetitle").innerText = "【成功】  ";
		document.all("messagelbl").innerText = message;
		document.all("messagebox").style.display = "";
	} else if (type == '2') {// 提示
		document.all("messagetyle").className = "alert alert-info";
		document.all("messagetitle").innerText = "【提示】  ";
		document.all("messagelbl").innerText = message;
		document.all("messagebox").style.display = "";
	} else if (type == '3') {// 警告
		document.all("messagetyle").className = "alert alert-warning";
		document.all("messagetitle").innerText = "【警告】  ";
		document.all("messagelbl").innerText = message;
		document.all("messagebox").style.display = "";
	} else if (type == '4') {// 注意、错误
		document.all("messagetyle").className = "alert alert-danger";
		document.all("messagetitle").innerText = "【注意】  ";
		document.all("messagelbl").innerText = message;
		document.all("messagebox").style.display = "";
	} else {

	}
	window.setTimeout(function() {
		document.all("messagebox").style.display = "none";
	}, 3000);
}

// 提示信息
function showMessage(code, message) {
	if (code == '1') {// 警告
		showMessageByType('1', '4', message);
	} else {
		let arr = message.split(":");
		showMessageByType('0', arr[0], arr[1]);
	}
}

//业务页面加载
function showPageForm(urlpath) {
	blankForm.action = urlpath;
	blankForm.submit();
}

function showPopPageForm(urlpath) {
	blankForm.action = urlpath;
	blankForm.submit();
}

// 页面刷新
function changeForm(urlpath, title, navbar) {
	showPageForm(urlpath);
	changeNavbar(title, navbar);
}

function changeNavbar(title) {
	// 更新功能显示名字
	document.all("title").innerText = title;
}
